package dto

import (
	"go-gateway-learn/public"
	"time"

	"github.com/gin-gonic/gin"
)

type AdminInfoOutput struct {
	ID           int       `json:"id"`
	UserName     string    `json:"user_name"`
	LoginTime    time.Time `json:"login_time"`
	Avatar       string    `json:"auatar"`
	Introduction string    `json:"introduction"`
	Roles        []string  `json:"roles"`
}

type ChangePwdInput struct {
	//	UserName string `json:"username" form:"username" comment:"姓名" example:"admin" validate:"required,is_valid_username"`
	Password string `json:"password" form:"password" comment:"密码" example:"123456" validate:"required"`
}

func (changepwd *ChangePwdInput) BindValid(c *gin.Context) error {
	return public.DefaultGetValidParams(c, changepwd)
}
